package com.zmzncs.lmtc.module.customer.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zmzncs.lmtc.module.customer.pojo.customer.Customer;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zmzncs.lmtc.module.customer.pojo.customer.CustomerDTO;
import com.zmzncs.lmtc.module.customer.pojo.customer.CustomerSearchForm;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 客户-客户信息 Mapper 接口
 * </p>
 *
 * @author 任建波
 * @since 2020-08-26
 */
@Repository
public interface CustomerDao extends BaseMapper<Customer> {

    /**获取会员列表*/
    IPage<CustomerDTO> getCustomerList(Page page, @Param("param") CustomerSearchForm param);
    /**会员详情*/
    CustomerDTO getCustomerInfo(Long id);
    /**获取正式会员或潜在会员数量*/
    Integer getVipCount(Integer isVip);
    /** 手机号/昵称查询会员信息*/
    List<CustomerDTO> getCustInfoByPhoneOrName(@Param("info") String info);
    /**查询正会员 */
    List<CustomerDTO> getInfoByMemberType(@Param("memberType") Integer memberType);

}
